Leadtools.Medical.Workstation.Client Requires Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
FindStudies(String,String,String,String[],String,String,String,String,String,String,String) Method
See Also  Example
Leadtools.Medical.Workstation.Client Namespace > QueryClient Class > FindStudies Method : FindStudies(String,String,String,String[],String,String,String,String,String,String,String) Method



patientName
The patient name String value to match the queried study against. This value can be null or Empty.
patientID
The patient ID String value to match the queried study against. This value can be null or Empty.
studyID
The study ID String value to match the queried study against. This value can be null or Empty.
modalitiesInStudy
An array of String which contains the modalities to match the queried study against. This value can be null or Empty.
accessionNumber
The accession number String value to match the queried study against. This value can be null or Empty.
referDrName
The referring physician name String value to match the queried study against. This value can be null or Empty.
studyDateStart
The study starting date of a DateTime value type to match the queried study against. This value can be null or Empty.
studyDateEnd
The study end date of a DateTime value type to match the queried study against. This value can be null or Empty.
studyTimeStart
The study starting time of a DateTime value type to match the queried study against. This value can be null or Empty.
studyTimeEnd
The study end time of a DateTime value type to match the queried study against. This value can be null or Empty.
studyInstanceUID
The Study Instance UID String value to match the queried study against. This value can be null or Empty.
patientName
The patient name String value to match the queried study against. This value can be null or Empty.
patientID
The patient ID String value to match the queried study against. This value can be null or Empty.
studyID
The study ID String value to match the queried study against. This value can be null or Empty.
modalitiesInStudy
An array of String which contains the modalities to match the queried study against. This value can be null or Empty.
accessionNumber
The accession number String value to match the queried study against. This value can be null or Empty.
referDrName
The referring physician name String value to match the queried study against. This value can be null or Empty.
studyDateStart
The study starting date of a DateTime value type to match the queried study against. This value can be null or Empty.
studyDateEnd
The study end date of a DateTime value type to match the queried study against. This value can be null or Empty.
studyTimeStart
The study starting time of a DateTime value type to match the queried study against. This value can be null or Empty.
studyTimeEnd
The study end time of a DateTime value type to match the queried study against. This value can be null or Empty.
studyInstanceUID
The Study Instance UID String value to match the queried study against. This value can be null or Empty.
Overloaded. Runs a study-based query with the specified parameters.

Syntax

Visual Basic (Declaration) 
Overloads Public Overridable Function FindStudies( _
   ByVal patientName As String, _
   ByVal patientID As String, _
   ByVal studyID As String, _
   ByVal modalitiesInStudy() As String, _
   ByVal accessionNumber As String, _
   ByVal referDrName As String, _
   ByVal studyDateStart As String, _
   ByVal studyDateEnd As String, _
   ByVal studyTimeStart As String, _
   ByVal studyTimeEnd As String, _
   ByVal studyInstanceUID As String _
) As ClientQueryDataSet
Visual Basic (Usage)Copy Code
Dim instance As QueryClient
Dim patientName As String
Dim patientID As String
Dim studyID As String
Dim modalitiesInStudy() As String
Dim accessionNumber As String
Dim referDrName As String
Dim studyDateStart As String
Dim studyDateEnd As String
Dim studyTimeStart As String
Dim studyTimeEnd As String
Dim studyInstanceUID As String
Dim value As ClientQueryDataSet
 
value = instance.FindStudies(patientName, patientID, studyID, modalitiesInStudy, accessionNumber, referDrName, studyDateStart, studyDateEnd, studyTimeStart, studyTimeEnd, studyInstanceUID)
C++/CLI 
public:
virtual ClientQueryDataSet^ FindStudies( 
   String^ patientName,
   String^ patientID,
   String^ studyID,
   array<String^>^ modalitiesInStudy,
   String^ accessionNumber,
   String^ referDrName,
   String^ studyDateStart,
   String^ studyDateEnd,
   String^ studyTimeStart,
   String^ studyTimeEnd,
   String^ studyInstanceUID
) 

Parameters

patientName
The patient name String value to match the queried study against. This value can be null or Empty.
patientID
The patient ID String value to match the queried study against. This value can be null or Empty.
studyID
The study ID String value to match the queried study against. This value can be null or Empty.
modalitiesInStudy
An array of String which contains the modalities to match the queried study against. This value can be null or Empty.
accessionNumber
The accession number String value to match the queried study against. This value can be null or Empty.
referDrName
The referring physician name String value to match the queried study against. This value can be null or Empty.
studyDateStart
The study starting date of a DateTime value type to match the queried study against. This value can be null or Empty.
studyDateEnd
The study end date of a DateTime value type to match the queried study against. This value can be null or Empty.
studyTimeStart
The study starting time of a DateTime value type to match the queried study against. This value can be null or Empty.
studyTimeEnd
The study end time of a DateTime value type to match the queried study against. This value can be null or Empty.
studyInstanceUID
The Study Instance UID String value to match the queried study against. This value can be null or Empty.

Return Value

A ClientQueryDataSet which contains the query results.

Example

Visual BasicCopy Code
<Test> _
Public Sub DatabaseQueryLocal()
  Leadtools.Examples.Support.Unlock()
  Dim clientInfo As AeInfo = New AeInfo ()


  clientInfo.Address = Dns.GetHostName() 'local machine
  clientInfo.AETitle = "TEST_CLIENT"
  clientInfo.Port = 1000

  'Make sure that the FindAddIn is configured properly before using this class.
  Dim client As DbQueryClient = New DbQueryClient (clientInfo)

  client.EnableLog = True
  client.LogFileName = ("c:\DicomLog.txt")

  PerformClientQuery (client)
End Sub

Public Sub PerformClientQuery(ByVal client As QueryClient)
  Dim studiesQuery As FindQuery = New FindQuery ()


  Dim studies As ClientQueryDataSet = client.FindStudies (studiesQuery)


  If studies.Studies.Count > 0 Then
     Dim study As ClientQueryDataSet.StudiesRow = studies.Studies (0)
     Dim seriesQuery As FindQuery = New FindQuery()


     seriesQuery.StudyInstanceUID = study.StudyInstanceUID

     Dim series As ClientQueryDataSet = client.FindSeries (seriesQuery)

     For Each seriesRow As ClientQueryDataSet.SeriesRow In series.Series
       Dim imagesQuery As FindQuery = New FindQuery ()


       imagesQuery.SeriesInstanceUID = seriesRow.SeriesInstanceUID

       Dim images As ClientQueryDataSet = client.FindImages (imagesQuery)


       For Each image As ClientQueryDataSet.ImagesRow In images.Images
         Console.WriteLine ("SOPInstanceUID: {0}", image.SOPInstanceUID)

         If (Not image.IsSeriesInstanceUIDNull ()) Then
           Console.WriteLine("SeriesInstanceUID: {0}", image.SeriesInstanceUID)
         End If

         If (Not image.IsStudyInstanceUIDNull ()) Then
           Console.WriteLine("StudyInstanceUID: {0}", image.StudyInstanceUID)
         End If
       Next image
     Next seriesRow
  End If
End Sub
C#Copy Code
public void DatabaseQueryLocal() 

   Leadtools.Examples.Support.Unlock(); 
 
   AeInfo clientInfo = new AeInfo ( ); 
 
 
   clientInfo.Address = Dns.GetHostName(); //local machine 
   clientInfo.AETitle = "TEST_CLIENT" ; 
   clientInfo.Port    = 1000 ; 
 
   //Make sure that the FindAddIn is configured properly before using this class. 
   DbQueryClient client = new DbQueryClient ( clientInfo ) ; 
 
   client.EnableLog = true; 
   client.LogFileName = ( @"c:\DicomLog.txt" ) ; 
 
   PerformClientQuery ( client ) ; 

 
public void PerformClientQuery ( QueryClient client )  

   FindQuery studiesQuery = new FindQuery ( ) ; 
 
 
   ClientQueryDataSet studies = client.FindStudies ( studiesQuery ) ; 
 
 
   if ( studies.Studies.Count > 0 )  
   { 
      ClientQueryDataSet.StudiesRow study = studies.Studies [ 0 ] ; 
      FindQuery seriesQuery = new FindQuery(); 
 
 
      seriesQuery.StudyInstanceUID = study.StudyInstanceUID ; 
 
      ClientQueryDataSet series = client.FindSeries ( seriesQuery ) ; 
 
      foreach ( ClientQueryDataSet.SeriesRow seriesRow in series.Series )  
      { 
         FindQuery imagesQuery = new FindQuery ( ) ; 
 
 
         imagesQuery.SeriesInstanceUID = seriesRow.SeriesInstanceUID ; 
 
         ClientQueryDataSet images = client.FindImages ( imagesQuery ) ; 
 
 
         foreach ( ClientQueryDataSet.ImagesRow image in images.Images )  
         { 
            Console.WriteLine ( "SOPInstanceUID: {0}", image.SOPInstanceUID ) ; 
 
            if ( !image.IsSeriesInstanceUIDNull ( ) ) 
            { 
               Console.WriteLine("SeriesInstanceUID: {0}", image.SeriesInstanceUID); 
            } 
 
            if ( !image.IsStudyInstanceUIDNull ( ) ) 
            { 
               Console.WriteLine("StudyInstanceUID: {0}", image.StudyInstanceUID); 
            } 
         } 
      } 
   } 
}

Remarks

Calling this method while the Processing property is true will result in an InvalidOperationException being thrown.

If the operation is cancelled this method will throw a ClientCommunicationCanceled exception.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Medical.Workstation.Client requires a Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features